<script lang="ts" setup>
import { reactive } from "vue";
const obj = reactive({ name: "张三", age: 18 });

const addAge = () => {
  obj.age++;
  console.log(obj);
};
</script>

<template>
  <p>{{ obj }}</p>
  <button @click="addAge()">点我年龄+1</button>
</template>

<style scoped></style>
